﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ((Admin)this.Master).mainCategory = "ACCOUNTS";
    }
    protected void gv_applicantList_SelectedIndexChanged(object sender, EventArgs e)
    {
        GridViewRow row = gv_applicantList.SelectedRow;

        if (row.Cells[2].Text.StartsWith("Debit"))
        {

            Response.Redirect("~/product/card/admin/ApplicationPending.aspx?applicationID=" + row.Cells[1].Text);
        }
        else
        {

            if (row.Cells[2].Text.StartsWith("H"))
            {

                Response.Redirect("~/product/insurance/admin/applicant_details_hospital.aspx?applicationID=" + row.Cells[1].Text);

            }
            else
            {
                Response.Redirect("~/product/insurance/admin/applicant_details_accident.aspx?applicationID=" + row.Cells[1].Text);
            }
        }
    }
}